﻿	      <?php include("conn.php");
             mysql_query('SET NAMES UTF8'); 

	  

// class MyPrizeBean
// {
// 	public $images;
// 	public $result;
// 	public $realname;
// 	public $phone;
// 	public $sex;
// 	public $niname;
// 	public $address;
// 	public $money;
// 	public $mycoupon;
// 		public $ma;
// 	function __construct($images,$result,$realname,$phone,$sex,$niname,$address,$money,$mycoupon,$ma)
// 	{
// 		$this->images      = $images;
// 		$this->result      = $result;
// 		$this->realname      = $realname;
// 		$this->phone      = $phone;
// 		$this->sex      = $sex;
// 		$this->niname      = $niname;
// 		$this->address      = $address;
// 		$this->money      = $money;
// 		$this->mycoupon      = $mycoupon;
// 		$this->ma      = $ma;
		
// 	}
// }
// $count=mysql_query("select count(*) from mycoupon where   userid ='".$_REQUEST[uid]."'");

//收藏的宝贝 计数
// $rs=mysql_fetch_array($count);
// $t1=$rs[0];


if($_REQUEST['userid'] == ''){
	echo json_encode(array('code'=>-100,'msg'=>'userid不能为空'));
	exit;
}
 
$rert30=mysql_query("select * from user  where userid=".$_REQUEST[userid]);

$prize = array();
	
$rowf=mysql_fetch_array($rert30);
if(!$rowf){
	echo json_encode(array('code'=>-200,'msg'=>'用户信息异常'));
	exit;
}
		
echo json_encode(array('code'=>200,'data'=>array('niname'=>$rowf['niname'],'images'=>$rowf['images'],'sex'=>$rowf['sex'],'tel'=>$rowf['phone'],'province'=>$rowf['province'],'city'=>$rowf['city'],'images'=>$rowf['images'])));

?>